package ui.frame.dialog;

import java.awt.event.ActionEvent;

import ui.Utility;
import ui.frame.GTFrame;
import ui.frame.GTextbook;
import ui.view.DnDIndexTree;
import ui.view.NodeInfo;
import ui.view.GTView;
import ui.view.IndexTreeView;
import static constants.GTextbookConstants.User_Name;
import static constants.GTextbookConstants.knowledgeObject;
import static constants.GTextbookConstants.language;

public class AddAxiomDialog extends AxiomDialog{
	public AddAxiomDialog(GTextbook theApp, GTFrame window, int language){
		super(theApp, window, language);

	}
	
	public void addNode(){
		String name = this.getBasicPanel().getNamePanel().getTextField().getText();	
        NodeInfo nodeInfo = new NodeInfo(User_Name,typeInString, Utility.getKnowledgeNameFromInput(name));
		DnDIndexTree tree = (DnDIndexTree)((IndexTreeView)(((GTView)(theApp.getView())).getIndexTabbedPane().getSelectedComponent())).getIndexTree();
		tree.addNodeWithChecking(nodeInfo);
	}

}
